/**
 * 
 */
package com.paic.mhis.hcpms.common.base.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author QIANDUO875
 *
 */
public class PaginatedDTO<T> implements Serializable{

	private static final long serialVersionUID = 3695939277873619087L;
	
	private int totalSize;
	private final List<T> dataList = new ArrayList<T>();
	
	public PaginatedDTO (List<T> l, int total) {
		if(l != null && l.size() >0) {
			dataList.addAll(l);
		}
		totalSize = total;
	}
	
	public int getTotalSize() {
		return totalSize;
	}
	public void setTotalSize(int totalSize) {
		this.totalSize = totalSize;
	}
	public List<T> getDataList() {
		return dataList;
	}
	public int getSize() {
		return dataList.size();
	}
}
